package cn.edu.sptc.sms_weiwubo.entity;


import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import org.springframework.lang.Nullable;

import java.util.Date;
//对应数据库中的学生表（t_student）
@Data
@Schema(description = "学生实体类（请求体/响应体共用）")
public class Student {
    //六个属性分别对应表中的六个字段，保证数据类型的对应匹配
    @Schema(description = "学生ID，自动新增",example = "1",hidden = true)
    @Nullable
    private Long id;
    @Schema(description = "专业ID，从专业表中的id选取",example = "1",required = true)
    private Long majorId;
    @Schema(description = "学生名称",example = "张三",required = true)
    private String name;
    @Schema(description = "学生性别",example = "女")
    @Nullable
    private String sex;
    @Schema(description = "创建时间，系统自动添加",hidden = true)
    @Nullable
    private Date createTime;
    @Schema(description = "更新时间，系统自动添加",hidden = true)
    @Nullable
    private Date updateTime;
}
